@import "~terriajs-variables";
@import "../../../Sass/common/mixins";

.btn {
  composes: btn from "../../../Sass/common/_buttons.scss";

  border-radius: 50%;
  display: block;
  float: inherit;
  background: #fff;
  color: $dark;
  height: 40px;
  width: 40px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);

  svg {
    height: 24px;
    width: 24px;
    margin: 0 auto;
    vertical-align: middle;
  }

  @media (min-width: $sm) {
    height: 31px;
    width: 30px;

    svg {
      height: 20px;
      width: 20px;
    }
  }
}

.btn-primary {
  @extend .btn;
  background: $color-primary;

  svg {
    fill: #fff;

    path {
      fill: #fff;
    }
  }

  &:hover,
  &--hover {
    background: get-hover-color($color-primary);
  }
}

.btn-blink {
  @extend .btn;

  svg {
    -webkit-animation-name: blinker;
    -webkit-animation-duration: 1s;
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;

    -moz-animation-name: blinker;
    -moz-animation-duration: 1s;
    -moz-animation-timing-function: linear;
    -moz-animation-iteration-count: infinite;

    animation-name: blinker;
    animation-duration: 1s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
}

@-moz-keyframes blinker {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@-webkit-keyframes blinker {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes blinker {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
